<template>
  <div>
    <h3>用户注册</h3>
    <h4>路由参数 -- {{routeParam}}</h4>
    <h4>直接从路由中获取restful风格的参数：{{this.$route.params.name}} === {{this.$route.params.age}}</h4>
  </div>
</template>
<script>
  export default {
    name: "register",
    data() {
      return {
        routeParam: "",
      }
    },
    created() {
      let name = this.$route.params.name;
      let age = this.$route.params.age;
      // console.log(name);
      if (name === undefined) {
        return;
      }
      let param = {name: name, age: age};
      this.routeParam = JSON.stringify(param);
    }
  }
</script>
<style scoped>

</style>
